<div class="pack-from">
    <form nz-form [formGroup]="config.formGroup">
        <div nz-row>
            <div nz-col [nzSpan]="config.colns">
                <ng-container *ngFor="let c of config.ele" class="form-row">
                    <div nz-col [nzSpan]="config.ns" [ngClass]="{'form-col':config.colns!=24}">
                        <div nz-form-label nz-col [nzXs]="24" [nzSm]="config.labelSm">
                            <ng-container *ngIf="c.require =='true'">
                                <label nz-form-item-required>{{c.desc}}</label>
                            </ng-container>
                            <ng-container *ngIf="c.require == null || c.require == 'false'">
                                <label>{{c.desc}}</label>
                            </ng-container>
                        </div>
                        <div nz-form-control nz-col [nzXs]="24" [nzSm]="config.inSm" [ngSwitch]="c.type" [nzValidateStatus]="getFormControl(c.dbName)">
                            <ng-container *ngSwitchCase="'select'">
                                <nz-select [formControlName]="c.dbName" [nzPlaceHolder]="'请选择'+c.desc" nzAllowClear [nzShowSearch]="true">
                                    <nz-option *ngFor="let select of c.selects" [nzLabel]="select.display" [nzValue]="select.value"></nz-option>
                                </nz-select>
                            </ng-container>
                            <ng-container *ngSwitchCase="'date'">
                                <nz-datepicker [formControlName]="c.dbName" [nzPlaceHolder]="'请选择'+c.desc" style="width: 100%;"></nz-datepicker>
                            </ng-container>
                            <ng-container *ngSwitchCase="'button'">
                                <nz-input [nzType]="'text'" [formControlName]="c.dbName" [nzPlaceHolder]="'请选择'+c.desc" (click)="eleClickEvent()"></nz-input>
                            </ng-container>
                            <ng-container *ngSwitchDefault>
                                <nz-input [nzType]="c.type" [formControlName]="c.dbName" [nzPlaceHolder]="'请输入'+c.desc"></nz-input>
                            </ng-container>
                        </div>
                    </div>
                </ng-container>
            </div>
        </div>

        <div nz-row>
            <div nz-col [nzSpan]="config.colns">
                <div nz-col [nzSpan]="config.ns" class="form-operator">
                    <div>
                        <ng-container [ngSwitch]="config.formType">
                            <ng-container *ngSwitchCase="'query'">
                                <button nz-button [nzType]="'primary'">查询</button>
                            </ng-container>
                            <ng-container *ngSwitchCase="'submit'">
                                <button nz-button [nzType]="'primary'">提交</button>
                            </ng-container>
                        </ng-container>
                        <button nz-button (click)="resetForm()">重置</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>